
import {defineComponent,PropType} from "vue"
import "./index.less"
export default defineComponent({
    props:{
      name:{
        type:String,
        default:"W"
      },
      width:{
        type:Number,
        default:120
      },
      value:{
        type:[String,Number],
      }
    },
    module:[String,Number],
    setup(props,ctx){
      const change=(e:any)=>{
        ctx.emit("update:value",e.target.value)
      }
        return ()=>(
          <div class="v-Input" style={{width:`${props.width}px`}}>
            <input class="v-input" value={props.value} onInput={change} />
            <span style="color:#d9d9d9">{props.name}</span>
          </div>
        )
    }
})
